<?php

namespace app\common\model\Business;

use app\admin\model\Admin;
use think\Model;

class Receive extends Model
{
        // 表名
        protected $name = 'business_receive';
        // 忽略数据表不存在的字段
        protected $field = true;
        // 设置返回的结果类型
        protected $resultSetType = 'collection';
        // 自动写入时间戳字段
        protected $autoWriteTimestamp = 'int';
        // 定义时间戳字段名
        protected $createTime = 'applytime';
        //禁止写入时间字段
        protected $updateTime = false;
        // 软删除的字段
        protected $deleteTime = false;
        // 追加属性
        protected $append = [
        ];
        public function business()
        {
            return $this->belongsTo(Business::class,'busid','id',[],'left')->setEagerlyType(0);
        }
        public function admin()
        {
            return $this->belongsTo(Admin::class,'applyid','id',[],'left')->setEagerlyType(0);
        }
}
